/**
 * @file mjnconverters.h
 * @brief Custom type convertors for QRemoteSignal services
 *
 * This program is free software; you can redistribute it and/or modify
 * it under the terms of the GNU General Public License as published by
 * the Free Software Foundation; version 3 of the License.
 *
 * @author VestniK (Sergey N.Vidyuk) sir.vestnik@gmail.com
 * @date 12 Nov 2009
 */
#ifndef _MjnConverters_H
#define _MjnConverters_H

#include <QtCore/QUuid>
#include <QtCore/QVariant>

#include "mjntypes.h"

namespace qrs {

   // ----- QUuid -----
   inline QVariant createArg(const QUuid &val) {
      // simply send string representation of the UUID
      return QVariant( val.toString() );
   }
   bool getArgValue(const QVariant &arg, QUuid &res);

   // WindType
   QVariant createArg(mjn::WindType val);

   bool getArgValue(const QVariant &arg, mjn::WindType &res);

   // SessionInfo
   QVariant createArg(const mjn::SessionInfo &val);
   bool getArgValue(const QVariant &arg, mjn::SessionInfo &res);
}

#endif
